home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 93 / CDMM_93_2.ISO / Project Nomads / nomads_demo_eng.exe / FACTORY.TCL < prev    next >
Encoding:
Text File  |  2002-04-19  |  3.7 KB  |  150 lines

  1. #
  2. #   Zustands-▄berwachungs-Script
  3. #   State Watch Script
  4. #
  5. #   Factory
  6. #
  7. #   created:    15-Jun-2000 Bernd
  8. #   
  9. #   (C) COPYRIGHT 2000 RADONLABS GMBH
  10. #
  11.  
  12. proc factorywatch_normal {} {
  13.  
  14.     # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
  15.     # (in BackPack) oder gebaut (kein Artefakt mehr) wird 
  16.     if {[.getartefactmode] == "false"} {
  17.         .announcestate house
  18.     } elseif {[.iscollected] == "true"} {
  19.         .announcestate backpack
  20.     } elseif {[.getcharges] <= 0} {
  21.         .setremoveable true
  22.     } elseif {[.getcreator] != "null"} {
  23.         .announcestate infactoryslot
  24.     }
  25. }
  26.  
  27. proc factorywatch_infactoryslot {} {
  28.  
  29.     # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
  30.     # (in BackPack) oder gebaut (kein Artefakt mehr) wird 
  31.     if {[.getartefactmode] == "false"} {
  32.         .announcestate house
  33.     } elseif {[.iscollected] == "true"} {
  34.         .announcestate backpack
  35.     } elseif {[.getcharges] <= 0} {
  36.         .setremoveable true
  37.     } elseif {[.getcreator] == "null"} {
  38.         .announcestate normal
  39.     }
  40. }
  41.  
  42. proc factorywatch_bauphase {} {
  43.  
  44.     # kann zerstoert oder wieder zusammengeklappt werden
  45.     if {[.iskilled] == "true"} {
  46.         .announcestate explode
  47.     } elseif {[.getartefactmode] == "true"} {
  48.         .announcestate normal
  49.     } elseif {[.isstatetimeover] == "true"} {
  50.         .announcestate house
  51.         usersymbolicname playerfactory
  52.     }
  53. }
  54.  
  55.  
  56. proc factorywatch_house {} {
  57.  
  58.     # kann zerstoert oder wieder zusammengeklappt werden
  59.     if {[.iskilled] == "true"} {
  60.         .announcestate explode
  61.     } elseif {[.getartefactmode] == "true"} {
  62.         .announcestate normal
  63.     } elseif {[.isdooropen] == "true"} {
  64.         .announcestate open
  65.     } elseif {[.isworking] == "true"} {
  66.         .announcestate working
  67.     } elseif {[.removebuilding] == "true"} {
  68.         .announcestate remove
  69.     }
  70. }
  71.  
  72. proc factorywatch_working {} {
  73.  
  74.     # kann zerstoert oder wieder zusammengeklappt werden
  75.     if {[.iskilled] == "true"} {
  76.         .announcestate explode
  77.     } elseif {[.getartefactmode] == "true"} {
  78.         .announcestate normal
  79.     } elseif {[.isworking] == "false"} {
  80.         .announcestate house
  81.     } elseif {[.removebuilding] == "true"} {
  82.         .announcestate remove
  83.     }
  84. }
  85.  
  86. proc factorywatch_explode {} {
  87.  
  88.     # Uebergang zum Artefakt oder Wegnehmen
  89.     if {[.isanimfinished] == "true"} {
  90.         if {[.getcharges] <= 0} {
  91.             .setremoveable true
  92.         } else {
  93.             .announcestate normal
  94.         .removefromisland
  95.         }
  96.     }
  97. }
  98.  
  99. proc factorywatch_remove {} {
  100.  
  101.     # Uebergang zum Artefakt oder Wegnehmen
  102.     if {[.isanimfinished] == "true"} {
  103.         if {[.getcharges] <= 0} {
  104.             .setremoveable true
  105.         } else {
  106.             .announcestate normal
  107.         .removefromisland
  108.         }
  109.     }
  110. }
  111.  
  112. proc factorywatch_backpack {} {
  113.  
  114.     # Moeglich: usgeworfen (Nicht mehr "gesammelt") oder im
  115.     # Menue gezeigt (sichtbar)
  116.     if {[.iscollected] == "false"} {
  117.         .announcestate normal
  118.     } elseif {[.isvisible] == "true"} {
  119.         .announcestate menue
  120.     }
  121. }
  122.  
  123. proc factorywatch_menu {} {
  124.  
  125.     if {[.isvisible] == "false"} {
  126.         .announcestate backpack
  127.     } elseif {[.getartefactuse] == "true"} {
  128.         .announcestate build
  129.     } elseif {[.iscollected] == "false"} {
  130.         .announcestate normal
  131.     }
  132. }
  133.  
  134. proc factorywatch_build {} {
  135.  
  136.     if {[.iskilled] == "true"} {
  137.         .announcestate explode
  138.     } elseif {[.getartefactmode] == "false"} {
  139.         .announcestate bauphase
  140.     } elseif {[.getartefactuse] == "false"} {
  141.         .announcestate backpack
  142.     }
  143. }
  144.  
  145. proc factorywatch_cinematic {} {
  146.  
  147.     # empty
  148. }    
  149.  
  150.